// 背景
import {Sprite} from "../base/sprite.js";
import { DataStore } from "../base/dataStore.js";

export class BackGround extends Sprite{
  constructor(){
    // 这里不能在super 之前调用this
    const image = Sprite.getImage('background');
    super(image,0,0,
      image.width,image.height,
      0,0,
      DataStore.getInstance().canvas.width, DataStore.getInstance().canvas.height
    ); // 调用父类的constructor(ctx,image,0,0,image.width, image.height,0, 0,image.width, image.height)
  }
}